package com.huang.auth.fallback;

import com.huang.auth.client.AuthUserClient;
import com.huang.auth.entity.to.AuthUserResourceTO;
import com.huang.auth.entity.vo.AuthUserVO;
import com.huang.entity.result.HStringResult;
import com.huang.entity.result.ResponseEnum;
import com.huang.entity.result.ResultBuilder;
import org.springframework.stereotype.Component;


/**
 * @author HuangShen
 * @Description
 * @create 2021-09-07 8:14
 */
@Component
public class AuthUserFallback implements AuthUserClient {


    @Override
    public HStringResult<AuthUserVO> queryByAccount(String account) {
        return ResultBuilder.failHSingle(ResponseEnum.SERVICE_RPC_TIME_OUT_ERROR);
    }

    @Override
    public HStringResult<AuthUserResourceTO> queryResourceByUserId(Long userId) {
        return ResultBuilder.failHSingle(ResponseEnum.SERVICE_RPC_TIME_OUT_ERROR);
    }
}
